const http=require('http');

//创建http服务
//createserver就是http的方法
const server =http.createServer((request,response)=>{
    response.setHeader('content-type','text/html;charset=utf-8');
response.end('你好');
});

server.listen(8000,()=>{
    console.log('服务启动成功');
});